package day05.wrapper;

import java.util.Scanner;

/**
 * @author yangwenqi
 * @decs TODO
 * @date 2025/4/25
 */
public class Test2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入一个字符串：");
        String input = scanner.nextLine();

        int lowerCount = 0;
        int upperCount = 0;
        int digitCount = 0;
        for (int i = 0; i < input.length(); i++) {
            char c = input.charAt(i);
            if (Character.isLowerCase(c)) {
                lowerCount++;
            } else if (Character.isUpperCase(c)) {
                upperCount++;
            } else if (Character.isDigit(c)) {
                digitCount++;
            }
        }

        System.out.println("小写字母的个数：" + lowerCount);
        System.out.println("大写字母的个数：" + upperCount);
        System.out.println("数字的个数：" + digitCount);

        scanner.close();
    }
}
